Intramedullary nails are often inserted into the medullary canals of bones to fix fractures. Such an intramedullary nail may be fixed relative to the bone via locking screws passed through transverse locking holes extending through the intramedullary nail. During insertion, however, intramedullary nails are often bent out of their normal curvature such that it is difficult to determine a position of the transverse locking holes. An aiming device may be used to guide a surgical instrument, such as a drill, and/or the locking screws through the transverse locking holes. However, purely mechanical aiming devices may not be reliable enough if, for example, the nail has bent in unpredictable way inside the bone. Current solutions employ x-ray imaging or electromagnetic tracking to determine the actual location of the transverse locking holes.